package com.heima.Controller;

import com.heima.Serivce.WemediamaterialChannelService;
import com.heima.model.Admin.Dtos.ChannelDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/wemedia/MEDIA/wemedia/api/v1/channel")
public class WemediamaterialChannelController {
    @Autowired
    WemediamaterialChannelService wemediamaterialNewService;

//    获取频道
    @GetMapping("/channels")
    public ResponseResult GetChannel()
    {
        ChannelDto channelDto=new ChannelDto();
        return wemediamaterialNewService.GetChannel(channelDto);
    }

//    Admin的fegin调用
    @PostMapping("/list")
    public ResponseResult ChannelList(@RequestBody ChannelDto channelDto)
    {
        return wemediamaterialNewService.GetChannel(channelDto);
    }
}
